﻿@model  IList<ProductAttributeName>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" rel="/ProductAttributeName/Create/" href="/ProductAttributeName/Create/?productCategoryCode=@ViewBag.ProductCategoryCode" target="dialog" mask="true" height="350">
                <span>添加属性</span></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layouth="80">
        <thead>
            <tr>
                <th width="80">
                    编码
                </th>
                <th width="140">
                    名称
                </th>
                <th width="70">
                    属性类型
                </th>
                <th width="90">
                    属性控件类型
                </th>
                <th width="60">
                    必选?
                </th>
                <th>
                    操 作
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var o in Model)
            {
                <tr>
                    <td>@o.AttributeNameCode
                    </td>
                    <td>@(o.AttributeName)
                        @(o.HasChild ? "[含子级]" : "")
                    </td>
                    <td>@(o.AttributeType.GetProductAttributeType())
                    </td>
                    <td>@(o.AttributeControlType.GetProductAttributeControlType())
                    </td>
                    <td>@(o.IsMust ? "是" : "否")
                    </td>
                    <td>
                        <a target="dialog" onclick='void(0);' mask="true" href='/ProductAttributeValue?productCategoryCode=@(ViewBag.ProductCategoryCode)&attributeNameCode=@(o.AttributeNameCode)' rel="/ProductAttributeValue/" title="@(o.AttributeName) - 属性值">
                            查看属性值</a>
                    </td>
                </tr>
            }
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>共 @Model.Count 个属性</span>
        </div>
    </div>
</div>
